package com.vodone.v1pin.active.delegate
{
	import com.vodone.v1pin.ServiceProvider;
	import com.vodone.v1pin.core.model.MainModelLocator;
	import com.vodone.v1pin.core.service.HttpJsonDelegate;
	
	import mx.rpc.http.mxml.HTTPService;

	public class ActiveDelegate
	{
		public static const LIST:String = "list";
		public static const INDEX:String = "index";
		public static function getActiveDetail( resultHandler:Function , id:String = "" , faultHandler:Function = null , context:Array = null ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().getActiveService;
			var params:Object = {
				id : id
			}
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler , context );
		}
		
		public static function getActiveList( resultHandler:Function , type:String = "list" , faultHandler:Function = null , context:Array = null ):void
		{
			var service:HTTPService = ServiceProvider.getInstance().getActiveListService;
			var params:Object = {
				type : type
			}
			var delegate:HttpJsonDelegate = new HttpJsonDelegate( service );
			delegate.send( params , resultHandler , faultHandler , context );
		}
	}
}